if (deployment != NULL)
opt_osname = (char*)ot_deployment_get_osname (deployment);
if (deployment == NULL)
- deployment = ot_admin_get_merge_deployment (deployments, opt_osname, deployment, NULL);
+ deployment = ot_admin_get_merge_deployment (deployments, opt_osname, deployment);
if (deployment == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
{
GOptionContext *context;
gboolean ret = FALSE;
- const char *osname;
gs_unref_object GFile *repo_path = NULL;
gs_unref_object GFile *deploy_dir = NULL;
gs_unref_object GFile *current_deployment = NULL;
goto out;
}
- osname = argv[1];
-
if (!ot_admin_cleanup (admin_opts->sysroot, cancellable, error))
goto out;
if (!opt_osname)
opt_osname = (char*)ot_deployment_get_osname (booted_deployment);
merge_deployment = ot_admin_get_merge_deployment (current_deployments, opt_osname,
- booted_deployment,
- NULL);
+ booted_deployment);
deployment_path = ot_admin_get_deployment_directory (admin_opts->sysroot, merge_deployment);
deployment_origin_path = ot_admin_get_deployment_origin_path (deployment_path);
merge_deployment = g_object_ref (provided_merge_deployment);
else
merge_deployment = ot_admin_get_merge_deployment (current_deployments, osname,
- booted_deployment,
- new_deployment);
+ booted_deployment);
compute_new_deployment_list (current_bootversion,
current_deployments, osname,
const char *relative_boot_link;
gs_unref_object OtDeployment *ret_deployment = NULL;
int entry_boot_version;
- int treebootserial;
- int deployserial;
+ int treebootserial = -1;
+ int deployserial = -1;
gs_free char *osname = NULL;
gs_free char *bootcsum = NULL;
gs_free char *treecsum = NULL;
OtDeployment *
ot_admin_get_merge_deployment (GPtrArray *deployments,
const char *osname,
- OtDeployment *booted_deployment,
- OtDeployment *new_deployment)
+ OtDeployment *booted_deployment)
{
g_return_val_if_fail (osname != NULL || booted_deployment != NULL, NULL);
osname = ot_deployment_get_osname (booted_deployment);
if (booted_deployment &&
- new_deployment &&
- g_strcmp0 (ot_deployment_get_osname (booted_deployment),
- ot_deployment_get_osname (new_deployment)) == 0)
+ g_strcmp0 (ot_deployment_get_osname (booted_deployment), osname) == 0)
{
return g_object_ref (booted_deployment);
}
if (strcmp (ot_deployment_get_osname (deployment), osname) != 0)
continue;
- if (deployment == new_deployment)
- continue;
return g_object_ref (deployment);
}
OtDeployment *ot_admin_get_merge_deployment (GPtrArray *deployment_list,
const char *osname,
- OtDeployment *booted_deployment,
- OtDeployment *new_deployment);
+ OtDeployment *booted_deployment);
GFile *ot_admin_get_deployment_origin_path (GFile *deployment_path);